<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ include file="/WEB-INF/jsp/business/include/doctype.jsp" %>
	<script type="text/javascript" src="${requestScope.contextPath}/js/cubiq-iscroll/iscroll.js"></script>
	<script type="text/javascript">
		var myScroll;
		function loaded() {
			myScroll = new iScroll('wrapper', { 
				checkDOMChanges: true,
				zoom: false
			});
			<c:if test="${param.ex eq 'Y'}"> myScroll.scrollTo(0, ${param.endY}, 0);</c:if>
		}
		document.addEventListener('touchmove', function (e) { e.preventDefault(); }, false);
		window.addEventListener('DOMContentLoaded', setTimeout(function () { loaded(); }, 100), false);
</script>
<link rel="stylesheet" type="text/css" href="${requestScope.contextPath}/js/jquery-ui-1.8.14.custom/css/ui-lightness/jquery-ui-1.8.14.custom.css" />

<script type="text/javascript">
		function goSearch() {
			var frm = document.boardSearch;
			if(frm.SearchStartDate.value == "" && frm.SearchEndDate.value == "" && trim(frm.SearchTitle.value) == "") {
				alert("검색어를 입력하세요.");
				frm.SearchTitle.value = "";
				return false;
			}else{
				return true;
			}
			return false;
		}
		$(function() {
			var dates = $('#SearchStartDate, #SearchEndDate').datepicker({
				showOn: "button",
				buttonImage: "${requestScope.contextPath}/images/reservation/cal1.gif",
				buttonImageOnly: true,
				numberOfMonths: 1,
				dateFormat: 'yy-mm-dd',
				showMonthAfterYear:true,
				monthNamesShort: ['1월','2월','3월','4월','5월','6월','7월','8월','9월','10월','11월','12월'],
				dayNamesMin: ['일', '월', '화', '수', '목', '금', '토'],
				showButtonPanel: true,
				onSelect: function(selectedDate) {
					var option = this.id == "SearchStartDate" ? "minDate" : "maxDate";
					var instance = $(this).data("datepicker");
					var date = $.datepicker.parseDate(instance.settings.dateFormat || $.datepicker._defaults.dateFormat, selectedDate, instance.settings);
					dates.not(this).datepicker("option", option, date);
				}
			});
		});
	</script>
<style type="text/css" media="all">
/*원본 : #wrapper { position:absolute; z-index:1; top:175px; bottom:0px; left:0; width:320px; overflow:auto; }*/
#wrapper { position:absolute; z-index:1; top:175px; bottom:0px; left:0; width:100%; overflow:auto; }
#scroller { position:absolute;  -webkit-tap-highlight-color:rgba(0,0,0,0); width:100%; padding:0; background:#fff; }
</style>
</head>
<body>
	<div id="wrap">
		<div class="header">
			<h1>전사소식</h1>
		</div><!-- // header -->
		<div class="search_box">
			<h3><a href="javascript:goUrl('${requestScope.contextPath}/business/mBoard/mBoardList.do?tog=${BoardRootCD}');">${BoardRootCDName}</a> &gt; ${BoardName}</h3>
      			<form name="boardSearch" method="get" action="${requestScope.contextPath}/business/mBoard/boardSearchList.do" onsubmit="return goSearch();">
      				<input type="hidden" name="strMode" value="3" />
      				<input type="hidden" name="BoardRootCD" value="${BoardRootCD}" />
      				<input type="hidden" name="BoardCD" value="${BoardCD}" />
      				<input type="hidden" name="SearchScope" value="C" />
      				<input type="hidden" name="CompanyCode" value="${CompanyCode}" />
      				<input type="hidden" name="SearchUserName" value="" />
      				<input type="hidden" name="SortFieldName" value="${SortFieldName}" />
      				<input type="hidden" name="SortAscDesc" value="desc" />
      				<input type="hidden" name="page" value="1" />
      				<input type="hidden" name="BoardName" value="${BoardName}" />
      				<input type="hidden" name="BoardRootCDName" value="${BoardRootCDName}" />
      				<input type="hidden" name="B_IsSub" value="${B_IsSub}" />
      				
      				<table summary="" cellspacing="0" class="table3"">
					<caption>게시판검색</caption>
					<colgroup>
						<col style="width:15%;" />
						<col style="width:85%;" />
					</colgroup>
					<tbody>
						<tr>
							<th scope="row"><label for="title">제목</label></th>
							<td><input type="text" name="SearchTitle" id="SearchTitle" value="${SearchTitle}" /> <input type="image" src="${requestScope.contextPath}/images/btn/btn_search2.gif" alt="게시물 제목 검색" /></td>
						</tr>
						<tr>
							<th scope="row"><label for="date">날짜</label></th>
							<td><input type="text" name="SearchStartDate" class="intxt4" value="${SearchStartDate}" id="SearchStartDate" readonly="readonly" />~<input type="text" name="SearchEndDate" title="날짜검색" class="intxt4" value="${SearchEndDate }" id="SearchEndDate" readonly="readonly" /> </td>
						</tr>
					</tbody>
				</table>
			</form>
		</div>
		<div id="wrapper" class="content">
			<div id="scroller">
				<div class="news2">
					<ul>
					<c:choose>
					<c:when test="${empty mapList}">
						<li>일치하는 자료가 없습니다.</li>
					</c:when>
					<c:otherwise>
						<c:forEach items="${mapList}" var="mapInfo" varStatus="status">
						<li><a href="javascript:goUrl('${requestScope.contextPath}/business/mBoard/boardView.do?strMode=4&ArticleCD=${mapInfo.ArticleCD}&CompanyCode=${CompanyCode}&strBoardRootCD=${BoardRootCD}&BoardCD=${BoardCD}&tog=${BoardRootCD}&BoardRootCD=${BoardRootCD}&BoardRootCDName=${BoardRootCDName}&BoardName=${BoardName}&B_IsSub=${B_IsSub}');"><span class="bold">${mapInfo.Title}</span><span class="date1">${mapInfo.UCreateDate}</span></a></li>
						</c:forEach>
					</c:otherwise>
					</c:choose>
					</ul>
					<c:if test="${mapList2.TotalRecordCnt > fn:length(mapList)}">  
						<div class="btn_more11">
							<p class="more11"><a href="javascript:goUrl('${requestScope.contextPath}/business/mBoard/boardSearchList.do?strMode=3&tog=${BoardRootCD}&CompanyCode=${CompanyCode}&BoardCD=${BoardCD}&BoardRootCD=${BoardRootCD}&BoardRootCDName=${BoardRootCDName}&BoardName=${BoardName}&SearchTitle=${SearchTitle}&SearchStartDate=${SearchStartDate}&SearchEndDate=${SearchEndDate}&B_IsSub=${B_IsSub}&page=${page+1}&ex=Y&endY='+endY);">15개 더보기</a></p>
							<p class="more22"><a href="javascript:myScroll.scrollTo(0, 0, 0);"><img src="${requestScope.contextPath}/images/news/btn_top.gif" alt="맨위로" />&nbsp;&nbsp;맨위로</a></p>
						</div>
					</c:if>
				</div>
			</div><!-- // content -->
		</div>
	</div><!-- // wrap -->
	<script type="text/javascript">//hideMask();</script>
</body>
</html>